package com.niit.service.Impl;

import com.niit.dao.TestInDao;
import com.niit.model.StudentPaperQuestionAnswer;
import com.niit.service.TestInService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class TestInServiceImpl implements TestInService {
    @Autowired
    private TestInDao testInDao;


    @Override
    public int addStudentPaperQuestionAnswer(StudentPaperQuestionAnswer studentPaperQuestionAnswer) {
        return testInDao.insertStudentPaperQuestionAnswer(studentPaperQuestionAnswer);
    }
    public int upStudentPaperQuestionAnswer(StudentPaperQuestionAnswer studentPaperQuestionAnswer){
        return testInDao.updateStudentPaperQuestionAnswer(studentPaperQuestionAnswer);
    }
    public StudentPaperQuestionAnswer seStudentPaperQuestionAnswer(Long id1,Long id2){
        return testInDao.selectStudentPaperQuestionAnswer(id1, id2); }

    @Override
    public List<StudentPaperQuestionAnswer> selectStudentPaperQuestionAnswerForPaper(Long id2) {
        return  testInDao.selectStudentPaperQuestionAnswerListForPaper(id2);

    }
}

